{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from py2neo import Graph,Node,Relationship"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import os\n",
    "import QUANTAXIS as QA\n",
    "import datetime\n",
    "import numpy as np \n",
    "import statsmodels.formula.api as sml\n",
    "from QAStrategy.qastockbase import QAStrategyStockBase\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import scipy.stats as scs\n",
    "import matplotlib.mlab as mlab\n",
    "from easyquant.indicator.base import *\n",
    "\n",
    "import json\n",
    "from easyquant import MongoIo\n",
    "import statsmodels.api as sm\n",
    "from multiprocessing import Process, Pool, cpu_count, Manager\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "mongo = MongoIo()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def tdx_base_func(data, code_list = None):\n",
    "    \"\"\"\n",
    "    准备数据\n",
    "    \"\"\"\n",
    "    # highs = data.high\n",
    "    # start_t = datetime.datetime.now()\n",
    "    # print(\"begin-tdx_base_func:\", start_t)\n",
    "    if len(data) < 10:\n",
    "        data = data.copy()\n",
    "        data['bflg'] = 0\n",
    "        data['sflg'] = 0\n",
    "        return data\n",
    "\n",
    "    CLOSE=data.close\n",
    "    C=data.close\n",
    "    # df_macd = MACD(C,12,26,9)\n",
    "    # mtj1 = IFAND(df_macd.DIFF < 0, df_macd.DEA < 0, 1, 0)\n",
    "    # mtj2 = IFAND(mtj1, df_macd.MACD < 0, 1, 0)\n",
    "    花 = SLOPE(EMA(C, 3), 3)\n",
    "    神 = SLOPE(EMA(C, 7), 7)\n",
    "    买 = IFAND(COUNT(花 < 神, 5)==4 , 花 >= 神,1,0)\n",
    "    卖 = IFAND(COUNT(花 >= 神, 5)==4, 花 < 神,1,0)\n",
    "    钻石 = IFAND(CROSS(花, 神), CLOSE / REF(CLOSE, 1) > 1.03, 1, 0)\n",
    "    买股 = IFAND(买, 钻石,1,0)\n",
    "    # 买股 = IFAND(mtj2, 买股1, 1, 0)\n",
    "    # AND(CROSS(花, 神)\n",
    "    # AND\n",
    "    # CLOSE / REF(CLOSE, 1) > 1.03);\n",
    "\n",
    "    # return pd.DataFrame({'FLG': 后炮}).iloc[-1]['FLG']\n",
    "    # return 后炮.iloc[-1]\n",
    "\n",
    "    # 斜率\n",
    "    data = data.copy()\n",
    "    # data['bflg'] = IF(REF(后炮,1) > 0, 1, 0)\n",
    "    data['bflg'] = 买股\n",
    "    data['sflg'] = 卖\n",
    "    # print(\"code=%s, bflg=%s\" % (code, data['bflg'].iloc[-1]))\n",
    "    # data['beta'] = 0\n",
    "    # data['R2'] = 0\n",
    "    # beta_rsquared = np.zeros((len(data), 2),)\n",
    "    #\n",
    "    # for i in range(N - 1, len(highs) - 1):\n",
    "    # #for i in range(len(highs))[N:]:\n",
    "    #     df_ne = data.iloc[i - N + 1:i + 1, :]\n",
    "    #     model = sml.ols(formula='high~low', data = df_ne)\n",
    "    #     result = model.fit()\n",
    "    #\n",
    "    #     # beta = low\n",
    "    #     beta_rsquared[i + 1, 0] = result.params[1]\n",
    "    #     beta_rsquared[i + 1, 1] = result.rsquared\n",
    "    #\n",
    "    # data[['beta', 'R2']] = beta_rsquared\n",
    "\n",
    "    # 日收益率\n",
    "    data['ret'] = data.close.pct_change(1)\n",
    "\n",
    "    # 标准分\n",
    "    # data['beta_norm'] = (data['beta'] - data.beta.rolling(M).mean().shift(1)) / data.beta.rolling(M).std().shift(1)\n",
    "    #\n",
    "    # beta_norm = data.columns.get_loc('beta_norm')\n",
    "    # beta = data.columns.get_loc('beta')\n",
    "    # for i in range(min(M, len(highs))):\n",
    "    #     data.iat[i, beta_norm] = (data.iat[i, beta] - data.iloc[:i - 1, beta].mean()) / data.iloc[:i - 1, beta].std() if (data.iloc[:i - 1, beta].std() != 0) else np.nan\n",
    "\n",
    "    # data.iat[2, beta_norm] = 0\n",
    "    # data['RSRS_R2'] = data.beta_norm * data.R2\n",
    "    # data = data.fillna(0)\n",
    "    #\n",
    "    # # 右偏标准分\n",
    "    # data['beta_right'] = data.RSRS_R2 * data.beta\n",
    "    # if code == '000732':\n",
    "    #     print(data.tail(22))\n",
    "\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "def buy_sell_fun(price, S1=1.0, S2=0.8):\n",
    "    \"\"\"\n",
    "    斜率指标交易策略标准分策略\n",
    "    \"\"\"\n",
    "    data = price.copy()\n",
    "    data['flag'] = 0 # 买卖标记\n",
    "    data['position'] = 0 # 持仓标记\n",
    "    data['hold_price'] = 0  # 持仓价格\n",
    "    bflag = data.columns.get_loc('bflg')\n",
    "    sflag = data.columns.get_loc('sflg')\n",
    "    # beta = data.columns.get_loc('beta')\n",
    "    flag = data.columns.get_loc('flag')\n",
    "    position_col = data.columns.get_loc('position')\n",
    "    close_col = data.columns.get_loc('close')\n",
    "    high_col = data.columns.get_loc('high')\n",
    "    open_col = data.columns.get_loc('open')\n",
    "    hold_price_col = data.columns.get_loc('hold_price')\n",
    "    position = 0 # 是否持仓，持仓：1，不持仓：0\n",
    "    for i in range(1,data.shape[0] - 1):\n",
    "        # 开仓\n",
    "        if data.iat[i, bflag] > 0 and position == 0:\n",
    "            data.iat[i, flag] = 1\n",
    "            data.iat[i, position_col] = 1\n",
    "            data.iat[i, hold_price_col] = data.iat[i, open_col]\n",
    "            data.iat[i + 1, position_col] = 1\n",
    "            data.iat[i + 1, hold_price_col] = data.iat[i, open_col]\n",
    "\n",
    "            position = 1\n",
    "\n",
    "            print(\"buy  : date=%s code=%s price=%.2f\" % (data.iloc[i].name[0], data.iloc[i].name[1], data.iloc[i].close))\n",
    "            code = data.iloc[i].name[1]\n",
    "            price = data.iloc[i].close\n",
    "#             qa_order.send_order('BUY', 'OPEN', code=code, price=price, volume=1000)\n",
    "            # order.send_order('SELL', 'CLOSE', code=code, price=price, volume=1000)\n",
    "        # 平仓\n",
    "        # elif data.iat[i, bflag] == S2 and position == 1:\n",
    "        elif data.iat[i, position_col] > 0 and position == 1:\n",
    "            cprice = data.iat[i, close_col]\n",
    "            # oprice = data.iat[i, open_col]\n",
    "            hole_price = data.iat[i, hold_price_col]\n",
    "            high_price = data.iat[i, high_col]\n",
    "            if cprice < hole_price * 0.95:# or cprice > hprice * 1.2:\n",
    "                data.iat[i, flag] = -1\n",
    "                data.iat[i + 1, position_col] = 0\n",
    "                data.iat[i + 1, hold_price_col] = 0\n",
    "                position = 0\n",
    "                print(\"sell : code=%s date=%s  price=%.2f\" % (data.iloc[i].name[0], data.iloc[i].name[1], data.iloc[i].close))\n",
    "                code = data.iloc[i].name[1]\n",
    "                price = data.iloc[i].close\n",
    "                # order.send_order('BUY', 'OPEN', code=code, price=price, volume=1000)\n",
    "#                 qa_order.send_order('SELL', 'CLOSE', code=code, price=price, volume=1000)\n",
    "\n",
    "            elif cprice > hole_price * 1.1 and high_price / cprice > 1.05:\n",
    "                data.iat[i, flag] = -1\n",
    "                data.iat[i + 1, position_col] = 0\n",
    "                data.iat[i + 1, hold_price_col] = 0\n",
    "                position = 0\n",
    "                print(\"sell : code=%s date=%s  price=%.2f\" % (data.iloc[i].name[0], data.iloc[i].name[1], data.iloc[i].close))\n",
    "                code = data.iloc[i].name[1]\n",
    "                price = data.iloc[i].close\n",
    "                # order.send_order('BUY', 'OPEN', code=code, price=price, volume=1000)\n",
    "#                 qa_order.send_order('SELL', 'CLOSE', code=code, price=price, volume=1000)\n",
    "\n",
    "            elif cprice > hole_price * 1.2 and high_price / cprice > 1.06:\n",
    "                data.iat[i, flag] = -1\n",
    "                data.iat[i + 1, position_col] = 0\n",
    "                data.iat[i + 1, hold_price_col] = 0\n",
    "                position = 0\n",
    "                print(\"sell : code=%s date=%s  price=%.2f\" % (data.iloc[i].name[0], data.iloc[i].name[1], data.iloc[i].close))\n",
    "                code = data.iloc[i].name[1]\n",
    "                price = data.iloc[i].close\n",
    "                # order.send_order('BUY', 'OPEN', code=code, price=price, volume=1000)\n",
    "#                 qa_order.send_order('SELL', 'CLOSE', code=code, price=price, volume=1000)\n",
    "\n",
    "            elif data.iat[i, sflag] > 0:\n",
    "                data.iat[i, flag] = -1\n",
    "                data.iat[i + 1, position_col] = 0\n",
    "                data.iat[i + 1, hold_price_col] = 0\n",
    "                position = 0\n",
    "                print(\"sell : code=%s date=%s  price=%.2f\" % (data.iloc[i].name[0], data.iloc[i].name[1], data.iloc[i].close))\n",
    "                code = data.iloc[i].name[1]\n",
    "                price = data.iloc[i].close\n",
    "                # order.send_order('BUY', 'OPEN', code=code, price=price, volume=1000)\n",
    "#                 qa_order.send_order('SELL', 'CLOSE', code=code, price=price, volume=1000)\n",
    "            else:\n",
    "                data.iat[i + 1, position_col] = data.iat[i, position_col]\n",
    "                data.iat[i + 1, hold_price_col] = data.iat[i, hold_price_col]\n",
    "        # 保持\n",
    "        else:\n",
    "            data.iat[i + 1, position_col] = data.iat[i, position_col]\n",
    "            data.iat[i + 1, hold_price_col] = data.iat[i, hold_price_col]\n",
    "\n",
    "    data['nav'] = (1+data.close.pct_change(1).fillna(0) * data.position).cumprod()\n",
    "    data['nav1'] = data.close * data.position\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df=mongo.get_stock_day('600718')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "buy  : date=2018-04-16 00:00:00 code=600718 price=15.35\n",
      "sell : code=2018-04-23 00:00:00 date=600718  price=14.97\n",
      "buy  : date=2018-10-17 00:00:00 code=600718 price=9.61\n",
      "sell : code=2018-10-25 00:00:00 date=600718  price=9.78\n",
      "buy  : date=2019-04-01 00:00:00 code=600718 price=15.58\n",
      "sell : code=2019-04-08 00:00:00 date=600718  price=15.02\n",
      "buy  : date=2020-02-05 00:00:00 code=600718 price=11.96\n",
      "sell : code=2020-02-11 00:00:00 date=600718  price=12.65\n",
      "buy  : date=2020-07-14 00:00:00 code=600718 price=13.78\n",
      "sell : code=2020-07-16 00:00:00 date=600718  price=12.28\n"
     ]
    }
   ],
   "source": [
    "data1=buy_sell_fun(df1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1=tdx_base_func(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>amount</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>vol</th>\n",
       "      <th>bflg</th>\n",
       "      <th>sflg</th>\n",
       "      <th>ret</th>\n",
       "      <th>flag</th>\n",
       "      <th>position</th>\n",
       "      <th>hold_price</th>\n",
       "      <th>nav</th>\n",
       "      <th>nav1</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-04-10</th>\n",
       "      <th>600718</th>\n",
       "      <td>4.809647e+08</td>\n",
       "      <td>14.52</td>\n",
       "      <td>15.00</td>\n",
       "      <td>14.30</td>\n",
       "      <td>14.96</td>\n",
       "      <td>330547.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.034574</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-11</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.096208e+08</td>\n",
       "      <td>14.54</td>\n",
       "      <td>14.82</td>\n",
       "      <td>14.45</td>\n",
       "      <td>14.62</td>\n",
       "      <td>211369.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.001377</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-12</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.078606e+08</td>\n",
       "      <td>14.56</td>\n",
       "      <td>14.75</td>\n",
       "      <td>14.40</td>\n",
       "      <td>14.56</td>\n",
       "      <td>142528.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.001376</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-13</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.983209e+08</td>\n",
       "      <td>14.71</td>\n",
       "      <td>15.28</td>\n",
       "      <td>14.70</td>\n",
       "      <td>15.20</td>\n",
       "      <td>266271.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.010302</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-16</th>\n",
       "      <th>600718</th>\n",
       "      <td>5.801121e+08</td>\n",
       "      <td>15.35</td>\n",
       "      <td>15.36</td>\n",
       "      <td>14.38</td>\n",
       "      <td>14.55</td>\n",
       "      <td>385949.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.043508</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>1.043508</td>\n",
       "      <td>15.35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-17</th>\n",
       "      <th>600718</th>\n",
       "      <td>5.744495e+08</td>\n",
       "      <td>14.63</td>\n",
       "      <td>15.65</td>\n",
       "      <td>14.38</td>\n",
       "      <td>15.35</td>\n",
       "      <td>382150.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.046906</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>0.994562</td>\n",
       "      <td>14.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-18</th>\n",
       "      <th>600718</th>\n",
       "      <td>6.655035e+08</td>\n",
       "      <td>15.60</td>\n",
       "      <td>15.84</td>\n",
       "      <td>14.26</td>\n",
       "      <td>14.66</td>\n",
       "      <td>441657.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.066302</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>1.060503</td>\n",
       "      <td>15.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-19</th>\n",
       "      <th>600718</th>\n",
       "      <td>8.856690e+08</td>\n",
       "      <td>15.74</td>\n",
       "      <td>16.38</td>\n",
       "      <td>15.27</td>\n",
       "      <td>15.46</td>\n",
       "      <td>559552.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.008974</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>1.070020</td>\n",
       "      <td>15.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-20</th>\n",
       "      <th>600718</th>\n",
       "      <td>7.582362e+08</td>\n",
       "      <td>15.73</td>\n",
       "      <td>16.22</td>\n",
       "      <td>15.45</td>\n",
       "      <td>15.50</td>\n",
       "      <td>475091.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.000635</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>1.069341</td>\n",
       "      <td>15.73</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-23</th>\n",
       "      <th>600718</th>\n",
       "      <td>6.050614e+08</td>\n",
       "      <td>14.97</td>\n",
       "      <td>16.06</td>\n",
       "      <td>14.71</td>\n",
       "      <td>15.76</td>\n",
       "      <td>395189.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>-0.048315</td>\n",
       "      <td>-1</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>14.97</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-24</th>\n",
       "      <th>600718</th>\n",
       "      <td>7.728129e+08</td>\n",
       "      <td>16.34</td>\n",
       "      <td>16.38</td>\n",
       "      <td>14.68</td>\n",
       "      <td>15.00</td>\n",
       "      <td>493715.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.091516</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-25</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.076896e+09</td>\n",
       "      <td>16.19</td>\n",
       "      <td>16.96</td>\n",
       "      <td>15.98</td>\n",
       "      <td>16.08</td>\n",
       "      <td>654332.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.009180</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-26</th>\n",
       "      <th>600718</th>\n",
       "      <td>9.569732e+08</td>\n",
       "      <td>16.39</td>\n",
       "      <td>16.88</td>\n",
       "      <td>15.93</td>\n",
       "      <td>16.23</td>\n",
       "      <td>579492.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.012353</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-27</th>\n",
       "      <th>600718</th>\n",
       "      <td>8.949925e+08</td>\n",
       "      <td>16.29</td>\n",
       "      <td>17.15</td>\n",
       "      <td>16.03</td>\n",
       "      <td>16.64</td>\n",
       "      <td>539782.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.006101</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-02</th>\n",
       "      <th>600718</th>\n",
       "      <td>7.077244e+08</td>\n",
       "      <td>15.23</td>\n",
       "      <td>16.01</td>\n",
       "      <td>14.98</td>\n",
       "      <td>15.91</td>\n",
       "      <td>456292.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.065071</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-03</th>\n",
       "      <th>600718</th>\n",
       "      <td>6.358908e+08</td>\n",
       "      <td>15.39</td>\n",
       "      <td>15.56</td>\n",
       "      <td>14.44</td>\n",
       "      <td>15.16</td>\n",
       "      <td>424084.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.010506</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-04</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.832379e+08</td>\n",
       "      <td>14.84</td>\n",
       "      <td>15.24</td>\n",
       "      <td>14.76</td>\n",
       "      <td>15.18</td>\n",
       "      <td>256013.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.035737</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-07</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.109762e+08</td>\n",
       "      <td>15.16</td>\n",
       "      <td>15.28</td>\n",
       "      <td>14.86</td>\n",
       "      <td>14.88</td>\n",
       "      <td>205537.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.021563</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-08</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.304588e+08</td>\n",
       "      <td>15.19</td>\n",
       "      <td>15.24</td>\n",
       "      <td>14.84</td>\n",
       "      <td>15.20</td>\n",
       "      <td>219278.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.001979</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-09</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.946539e+08</td>\n",
       "      <td>14.98</td>\n",
       "      <td>15.33</td>\n",
       "      <td>14.88</td>\n",
       "      <td>15.13</td>\n",
       "      <td>195379.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.013825</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-10</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.098347e+08</td>\n",
       "      <td>14.71</td>\n",
       "      <td>15.06</td>\n",
       "      <td>14.49</td>\n",
       "      <td>15.02</td>\n",
       "      <td>210208.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.018024</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-11</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.526863e+08</td>\n",
       "      <td>14.58</td>\n",
       "      <td>14.78</td>\n",
       "      <td>14.53</td>\n",
       "      <td>14.73</td>\n",
       "      <td>104392.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.008838</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-14</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.310409e+08</td>\n",
       "      <td>14.21</td>\n",
       "      <td>14.68</td>\n",
       "      <td>14.20</td>\n",
       "      <td>14.50</td>\n",
       "      <td>160219.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.025377</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-15</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.445778e+08</td>\n",
       "      <td>14.77</td>\n",
       "      <td>14.78</td>\n",
       "      <td>14.25</td>\n",
       "      <td>14.26</td>\n",
       "      <td>168086.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.039409</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-16</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.758149e+08</td>\n",
       "      <td>14.58</td>\n",
       "      <td>14.77</td>\n",
       "      <td>14.52</td>\n",
       "      <td>14.70</td>\n",
       "      <td>120229.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.012864</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-17</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.605524e+08</td>\n",
       "      <td>14.37</td>\n",
       "      <td>14.73</td>\n",
       "      <td>14.33</td>\n",
       "      <td>14.52</td>\n",
       "      <td>110721.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.014403</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-18</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.068239e+08</td>\n",
       "      <td>14.33</td>\n",
       "      <td>14.52</td>\n",
       "      <td>14.08</td>\n",
       "      <td>14.45</td>\n",
       "      <td>144491.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.002784</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-21</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.025808e+08</td>\n",
       "      <td>14.67</td>\n",
       "      <td>14.74</td>\n",
       "      <td>14.33</td>\n",
       "      <td>14.40</td>\n",
       "      <td>138518.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.023726</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-22</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.761505e+08</td>\n",
       "      <td>14.56</td>\n",
       "      <td>14.70</td>\n",
       "      <td>14.41</td>\n",
       "      <td>14.70</td>\n",
       "      <td>121237.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.007498</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-23</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.204217e+08</td>\n",
       "      <td>14.56</td>\n",
       "      <td>14.94</td>\n",
       "      <td>14.36</td>\n",
       "      <td>14.48</td>\n",
       "      <td>218615.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.017675</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-06</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.275795e+08</td>\n",
       "      <td>12.68</td>\n",
       "      <td>12.83</td>\n",
       "      <td>12.37</td>\n",
       "      <td>12.49</td>\n",
       "      <td>259848.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.030057</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-07</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.638551e+08</td>\n",
       "      <td>12.60</td>\n",
       "      <td>12.91</td>\n",
       "      <td>12.53</td>\n",
       "      <td>12.73</td>\n",
       "      <td>286015.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.006309</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-08</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.337071e+08</td>\n",
       "      <td>12.67</td>\n",
       "      <td>12.81</td>\n",
       "      <td>12.50</td>\n",
       "      <td>12.57</td>\n",
       "      <td>264412.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.005556</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-09</th>\n",
       "      <th>600718</th>\n",
       "      <td>4.116644e+08</td>\n",
       "      <td>12.94</td>\n",
       "      <td>13.24</td>\n",
       "      <td>12.70</td>\n",
       "      <td>12.70</td>\n",
       "      <td>317976.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.021310</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-10</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.281209e+08</td>\n",
       "      <td>12.76</td>\n",
       "      <td>13.16</td>\n",
       "      <td>12.74</td>\n",
       "      <td>12.88</td>\n",
       "      <td>254210.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.013910</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-13</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.281003e+08</td>\n",
       "      <td>13.03</td>\n",
       "      <td>13.10</td>\n",
       "      <td>12.81</td>\n",
       "      <td>12.92</td>\n",
       "      <td>253223.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.021160</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.261529</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-14</th>\n",
       "      <th>600718</th>\n",
       "      <td>6.809007e+08</td>\n",
       "      <td>13.78</td>\n",
       "      <td>13.83</td>\n",
       "      <td>12.82</td>\n",
       "      <td>13.03</td>\n",
       "      <td>510503.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.057559</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>1.334142</td>\n",
       "      <td>13.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-15</th>\n",
       "      <th>600718</th>\n",
       "      <td>4.218942e+08</td>\n",
       "      <td>12.92</td>\n",
       "      <td>13.73</td>\n",
       "      <td>12.91</td>\n",
       "      <td>13.68</td>\n",
       "      <td>319614.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.062409</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>1.250879</td>\n",
       "      <td>12.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-16</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.005470e+08</td>\n",
       "      <td>12.28</td>\n",
       "      <td>13.07</td>\n",
       "      <td>12.25</td>\n",
       "      <td>12.89</td>\n",
       "      <td>238765.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.049536</td>\n",
       "      <td>-1</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>12.28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-17</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.964593e+08</td>\n",
       "      <td>12.17</td>\n",
       "      <td>12.44</td>\n",
       "      <td>12.05</td>\n",
       "      <td>12.30</td>\n",
       "      <td>160381.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.008958</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-20</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.764574e+08</td>\n",
       "      <td>12.50</td>\n",
       "      <td>12.54</td>\n",
       "      <td>12.10</td>\n",
       "      <td>12.29</td>\n",
       "      <td>143089.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.027116</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-21</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.915045e+08</td>\n",
       "      <td>12.65</td>\n",
       "      <td>12.69</td>\n",
       "      <td>12.38</td>\n",
       "      <td>12.49</td>\n",
       "      <td>152726.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.012000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-22</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.356912e+08</td>\n",
       "      <td>12.70</td>\n",
       "      <td>13.04</td>\n",
       "      <td>12.52</td>\n",
       "      <td>12.55</td>\n",
       "      <td>183903.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.003953</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-23</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.228955e+08</td>\n",
       "      <td>12.42</td>\n",
       "      <td>12.79</td>\n",
       "      <td>12.15</td>\n",
       "      <td>12.63</td>\n",
       "      <td>179292.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.022047</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-24</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.271982e+08</td>\n",
       "      <td>11.73</td>\n",
       "      <td>12.50</td>\n",
       "      <td>11.69</td>\n",
       "      <td>12.41</td>\n",
       "      <td>188281.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.055556</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-27</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.286828e+08</td>\n",
       "      <td>11.74</td>\n",
       "      <td>11.90</td>\n",
       "      <td>11.66</td>\n",
       "      <td>11.79</td>\n",
       "      <td>109452.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000853</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-28</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.147336e+08</td>\n",
       "      <td>11.71</td>\n",
       "      <td>11.91</td>\n",
       "      <td>11.67</td>\n",
       "      <td>11.88</td>\n",
       "      <td>97365.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.002555</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-29</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.913491e+08</td>\n",
       "      <td>12.07</td>\n",
       "      <td>12.11</td>\n",
       "      <td>11.70</td>\n",
       "      <td>11.76</td>\n",
       "      <td>160213.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.030743</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-30</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.517395e+08</td>\n",
       "      <td>11.91</td>\n",
       "      <td>12.15</td>\n",
       "      <td>11.89</td>\n",
       "      <td>12.09</td>\n",
       "      <td>126461.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.013256</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.589106e+08</td>\n",
       "      <td>11.99</td>\n",
       "      <td>12.12</td>\n",
       "      <td>11.83</td>\n",
       "      <td>11.91</td>\n",
       "      <td>132855.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.006717</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-03</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.737520e+08</td>\n",
       "      <td>12.39</td>\n",
       "      <td>12.44</td>\n",
       "      <td>11.93</td>\n",
       "      <td>11.99</td>\n",
       "      <td>224006.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.033361</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-04</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.079458e+08</td>\n",
       "      <td>12.18</td>\n",
       "      <td>12.48</td>\n",
       "      <td>12.15</td>\n",
       "      <td>12.42</td>\n",
       "      <td>169706.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.016949</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-05</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.216063e+08</td>\n",
       "      <td>12.32</td>\n",
       "      <td>12.58</td>\n",
       "      <td>12.20</td>\n",
       "      <td>12.50</td>\n",
       "      <td>179681.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.011494</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-06</th>\n",
       "      <th>600718</th>\n",
       "      <td>4.313888e+08</td>\n",
       "      <td>12.56</td>\n",
       "      <td>12.71</td>\n",
       "      <td>12.12</td>\n",
       "      <td>12.32</td>\n",
       "      <td>345772.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.019481</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-07</th>\n",
       "      <th>600718</th>\n",
       "      <td>3.091436e+08</td>\n",
       "      <td>12.18</td>\n",
       "      <td>12.53</td>\n",
       "      <td>12.07</td>\n",
       "      <td>12.52</td>\n",
       "      <td>252358.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>-0.030255</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-10</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.866122e+08</td>\n",
       "      <td>12.23</td>\n",
       "      <td>12.37</td>\n",
       "      <td>12.14</td>\n",
       "      <td>12.24</td>\n",
       "      <td>152443.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.004105</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-11</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.591125e+08</td>\n",
       "      <td>11.77</td>\n",
       "      <td>12.23</td>\n",
       "      <td>11.72</td>\n",
       "      <td>12.20</td>\n",
       "      <td>216458.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.037612</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-12</th>\n",
       "      <th>600718</th>\n",
       "      <td>2.990059e+08</td>\n",
       "      <td>11.57</td>\n",
       "      <td>11.79</td>\n",
       "      <td>11.27</td>\n",
       "      <td>11.70</td>\n",
       "      <td>260624.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.016992</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-13</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.172902e+08</td>\n",
       "      <td>11.65</td>\n",
       "      <td>11.67</td>\n",
       "      <td>11.50</td>\n",
       "      <td>11.57</td>\n",
       "      <td>101141.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.006914</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-14</th>\n",
       "      <th>600718</th>\n",
       "      <td>1.075976e+08</td>\n",
       "      <td>11.76</td>\n",
       "      <td>11.79</td>\n",
       "      <td>11.58</td>\n",
       "      <td>11.58</td>\n",
       "      <td>91907.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.009442</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.188916</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>574 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                         amount  close   high    low   open       vol  bflg  \\\n",
       "date       code                                                               \n",
       "2018-04-10 600718  4.809647e+08  14.52  15.00  14.30  14.96  330547.0     0   \n",
       "2018-04-11 600718  3.096208e+08  14.54  14.82  14.45  14.62  211369.0     0   \n",
       "2018-04-12 600718  2.078606e+08  14.56  14.75  14.40  14.56  142528.0     0   \n",
       "2018-04-13 600718  3.983209e+08  14.71  15.28  14.70  15.20  266271.0     0   \n",
       "2018-04-16 600718  5.801121e+08  15.35  15.36  14.38  14.55  385949.0     1   \n",
       "2018-04-17 600718  5.744495e+08  14.63  15.65  14.38  15.35  382150.0     0   \n",
       "2018-04-18 600718  6.655035e+08  15.60  15.84  14.26  14.66  441657.0     0   \n",
       "2018-04-19 600718  8.856690e+08  15.74  16.38  15.27  15.46  559552.0     0   \n",
       "2018-04-20 600718  7.582362e+08  15.73  16.22  15.45  15.50  475091.0     0   \n",
       "2018-04-23 600718  6.050614e+08  14.97  16.06  14.71  15.76  395189.0     0   \n",
       "2018-04-24 600718  7.728129e+08  16.34  16.38  14.68  15.00  493715.0     0   \n",
       "2018-04-25 600718  1.076896e+09  16.19  16.96  15.98  16.08  654332.0     0   \n",
       "2018-04-26 600718  9.569732e+08  16.39  16.88  15.93  16.23  579492.0     0   \n",
       "2018-04-27 600718  8.949925e+08  16.29  17.15  16.03  16.64  539782.0     0   \n",
       "2018-05-02 600718  7.077244e+08  15.23  16.01  14.98  15.91  456292.0     0   \n",
       "2018-05-03 600718  6.358908e+08  15.39  15.56  14.44  15.16  424084.0     0   \n",
       "2018-05-04 600718  3.832379e+08  14.84  15.24  14.76  15.18  256013.0     0   \n",
       "2018-05-07 600718  3.109762e+08  15.16  15.28  14.86  14.88  205537.0     0   \n",
       "2018-05-08 600718  3.304588e+08  15.19  15.24  14.84  15.20  219278.0     0   \n",
       "2018-05-09 600718  2.946539e+08  14.98  15.33  14.88  15.13  195379.0     0   \n",
       "2018-05-10 600718  3.098347e+08  14.71  15.06  14.49  15.02  210208.0     0   \n",
       "2018-05-11 600718  1.526863e+08  14.58  14.78  14.53  14.73  104392.0     0   \n",
       "2018-05-14 600718  2.310409e+08  14.21  14.68  14.20  14.50  160219.0     0   \n",
       "2018-05-15 600718  2.445778e+08  14.77  14.78  14.25  14.26  168086.0     0   \n",
       "2018-05-16 600718  1.758149e+08  14.58  14.77  14.52  14.70  120229.0     0   \n",
       "2018-05-17 600718  1.605524e+08  14.37  14.73  14.33  14.52  110721.0     0   \n",
       "2018-05-18 600718  2.068239e+08  14.33  14.52  14.08  14.45  144491.0     0   \n",
       "2018-05-21 600718  2.025808e+08  14.67  14.74  14.33  14.40  138518.0     0   \n",
       "2018-05-22 600718  1.761505e+08  14.56  14.70  14.41  14.70  121237.0     0   \n",
       "2018-05-23 600718  3.204217e+08  14.56  14.94  14.36  14.48  218615.0     0   \n",
       "...                         ...    ...    ...    ...    ...       ...   ...   \n",
       "2020-07-06 600718  3.275795e+08  12.68  12.83  12.37  12.49  259848.0     0   \n",
       "2020-07-07 600718  3.638551e+08  12.60  12.91  12.53  12.73  286015.0     0   \n",
       "2020-07-08 600718  3.337071e+08  12.67  12.81  12.50  12.57  264412.0     0   \n",
       "2020-07-09 600718  4.116644e+08  12.94  13.24  12.70  12.70  317976.0     0   \n",
       "2020-07-10 600718  3.281209e+08  12.76  13.16  12.74  12.88  254210.0     0   \n",
       "2020-07-13 600718  3.281003e+08  13.03  13.10  12.81  12.92  253223.0     0   \n",
       "2020-07-14 600718  6.809007e+08  13.78  13.83  12.82  13.03  510503.0     1   \n",
       "2020-07-15 600718  4.218942e+08  12.92  13.73  12.91  13.68  319614.0     0   \n",
       "2020-07-16 600718  3.005470e+08  12.28  13.07  12.25  12.89  238765.0     0   \n",
       "2020-07-17 600718  1.964593e+08  12.17  12.44  12.05  12.30  160381.0     0   \n",
       "2020-07-20 600718  1.764574e+08  12.50  12.54  12.10  12.29  143089.0     0   \n",
       "2020-07-21 600718  1.915045e+08  12.65  12.69  12.38  12.49  152726.0     0   \n",
       "2020-07-22 600718  2.356912e+08  12.70  13.04  12.52  12.55  183903.0     0   \n",
       "2020-07-23 600718  2.228955e+08  12.42  12.79  12.15  12.63  179292.0     0   \n",
       "2020-07-24 600718  2.271982e+08  11.73  12.50  11.69  12.41  188281.0     0   \n",
       "2020-07-27 600718  1.286828e+08  11.74  11.90  11.66  11.79  109452.0     0   \n",
       "2020-07-28 600718  1.147336e+08  11.71  11.91  11.67  11.88   97365.0     0   \n",
       "2020-07-29 600718  1.913491e+08  12.07  12.11  11.70  11.76  160213.0     0   \n",
       "2020-07-30 600718  1.517395e+08  11.91  12.15  11.89  12.09  126461.0     0   \n",
       "2020-07-31 600718  1.589106e+08  11.99  12.12  11.83  11.91  132855.0     0   \n",
       "2020-08-03 600718  2.737520e+08  12.39  12.44  11.93  11.99  224006.0     0   \n",
       "2020-08-04 600718  2.079458e+08  12.18  12.48  12.15  12.42  169706.0     0   \n",
       "2020-08-05 600718  2.216063e+08  12.32  12.58  12.20  12.50  179681.0     0   \n",
       "2020-08-06 600718  4.313888e+08  12.56  12.71  12.12  12.32  345772.0     0   \n",
       "2020-08-07 600718  3.091436e+08  12.18  12.53  12.07  12.52  252358.0     0   \n",
       "2020-08-10 600718  1.866122e+08  12.23  12.37  12.14  12.24  152443.0     0   \n",
       "2020-08-11 600718  2.591125e+08  11.77  12.23  11.72  12.20  216458.0     0   \n",
       "2020-08-12 600718  2.990059e+08  11.57  11.79  11.27  11.70  260624.0     0   \n",
       "2020-08-13 600718  1.172902e+08  11.65  11.67  11.50  11.57  101141.0     0   \n",
       "2020-08-14 600718  1.075976e+08  11.76  11.79  11.58  11.58   91907.0     0   \n",
       "\n",
       "                   sflg       ret  flag  position  hold_price       nav   nav1  \n",
       "date       code                                                                 \n",
       "2018-04-10 600718     0 -0.034574     0         0           0  1.000000   0.00  \n",
       "2018-04-11 600718     0  0.001377     0         0           0  1.000000   0.00  \n",
       "2018-04-12 600718     0  0.001376     0         0           0  1.000000   0.00  \n",
       "2018-04-13 600718     0  0.010302     0         0           0  1.000000   0.00  \n",
       "2018-04-16 600718     0  0.043508     1         1          14  1.043508  15.35  \n",
       "2018-04-17 600718     0 -0.046906     0         1          14  0.994562  14.63  \n",
       "2018-04-18 600718     0  0.066302     0         1          14  1.060503  15.60  \n",
       "2018-04-19 600718     0  0.008974     0         1          14  1.070020  15.74  \n",
       "2018-04-20 600718     0 -0.000635     0         1          14  1.069341  15.73  \n",
       "2018-04-23 600718     1 -0.048315    -1         1          14  1.017675  14.97  \n",
       "2018-04-24 600718     0  0.091516     0         0           0  1.017675   0.00  \n",
       "2018-04-25 600718     0 -0.009180     0         0           0  1.017675   0.00  \n",
       "2018-04-26 600718     0  0.012353     0         0           0  1.017675   0.00  \n",
       "2018-04-27 600718     0 -0.006101     0         0           0  1.017675   0.00  \n",
       "2018-05-02 600718     0 -0.065071     0         0           0  1.017675   0.00  \n",
       "2018-05-03 600718     0  0.010506     0         0           0  1.017675   0.00  \n",
       "2018-05-04 600718     0 -0.035737     0         0           0  1.017675   0.00  \n",
       "2018-05-07 600718     0  0.021563     0         0           0  1.017675   0.00  \n",
       "2018-05-08 600718     0  0.001979     0         0           0  1.017675   0.00  \n",
       "2018-05-09 600718     0 -0.013825     0         0           0  1.017675   0.00  \n",
       "2018-05-10 600718     0 -0.018024     0         0           0  1.017675   0.00  \n",
       "2018-05-11 600718     0 -0.008838     0         0           0  1.017675   0.00  \n",
       "2018-05-14 600718     0 -0.025377     0         0           0  1.017675   0.00  \n",
       "2018-05-15 600718     0  0.039409     0         0           0  1.017675   0.00  \n",
       "2018-05-16 600718     0 -0.012864     0         0           0  1.017675   0.00  \n",
       "2018-05-17 600718     0 -0.014403     0         0           0  1.017675   0.00  \n",
       "2018-05-18 600718     0 -0.002784     0         0           0  1.017675   0.00  \n",
       "2018-05-21 600718     0  0.023726     0         0           0  1.017675   0.00  \n",
       "2018-05-22 600718     0 -0.007498     0         0           0  1.017675   0.00  \n",
       "2018-05-23 600718     0  0.000000     0         0           0  1.017675   0.00  \n",
       "...                 ...       ...   ...       ...         ...       ...    ...  \n",
       "2020-07-06 600718     0  0.030057     0         0           0  1.261529   0.00  \n",
       "2020-07-07 600718     0 -0.006309     0         0           0  1.261529   0.00  \n",
       "2020-07-08 600718     1  0.005556     0         0           0  1.261529   0.00  \n",
       "2020-07-09 600718     0  0.021310     0         0           0  1.261529   0.00  \n",
       "2020-07-10 600718     0 -0.013910     0         0           0  1.261529   0.00  \n",
       "2020-07-13 600718     0  0.021160     0         0           0  1.261529   0.00  \n",
       "2020-07-14 600718     0  0.057559     1         1          13  1.334142  13.78  \n",
       "2020-07-15 600718     0 -0.062409     0         1          13  1.250879  12.92  \n",
       "2020-07-16 600718     0 -0.049536    -1         1          13  1.188916  12.28  \n",
       "2020-07-17 600718     0 -0.008958     0         0           0  1.188916   0.00  \n",
       "2020-07-20 600718     0  0.027116     0         0           0  1.188916   0.00  \n",
       "2020-07-21 600718     0  0.012000     0         0           0  1.188916   0.00  \n",
       "2020-07-22 600718     0  0.003953     0         0           0  1.188916   0.00  \n",
       "2020-07-23 600718     0 -0.022047     0         0           0  1.188916   0.00  \n",
       "2020-07-24 600718     0 -0.055556     0         0           0  1.188916   0.00  \n",
       "2020-07-27 600718     0  0.000853     0         0           0  1.188916   0.00  \n",
       "2020-07-28 600718     0 -0.002555     0         0           0  1.188916   0.00  \n",
       "2020-07-29 600718     0  0.030743     0         0           0  1.188916   0.00  \n",
       "2020-07-30 600718     0 -0.013256     0         0           0  1.188916   0.00  \n",
       "2020-07-31 600718     0  0.006717     0         0           0  1.188916   0.00  \n",
       "2020-08-03 600718     0  0.033361     0         0           0  1.188916   0.00  \n",
       "2020-08-04 600718     0 -0.016949     0         0           0  1.188916   0.00  \n",
       "2020-08-05 600718     0  0.011494     0         0           0  1.188916   0.00  \n",
       "2020-08-06 600718     0  0.019481     0         0           0  1.188916   0.00  \n",
       "2020-08-07 600718     1 -0.030255     0         0           0  1.188916   0.00  \n",
       "2020-08-10 600718     0  0.004105     0         0           0  1.188916   0.00  \n",
       "2020-08-11 600718     0 -0.037612     0         0           0  1.188916   0.00  \n",
       "2020-08-12 600718     0 -0.016992     0         0           0  1.188916   0.00  \n",
       "2020-08-13 600718     0  0.006914     0         0           0  1.188916   0.00  \n",
       "2020-08-14 600718     0  0.009442     0         0           0  1.188916   0.00  \n",
       "\n",
       "[574 rows x 14 columns]"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1.loc['2018-04-10':]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = np.array([10,11,13,15,12,7,14])\n",
    "ap = np.array([1,1,1,1,1,0,0])\n",
    "b = np.array([1.2,1.1,1.8,1.5,1.2,0.7,1.4])\n",
    "# a = np.array([[10,11,13,15,12,7,14],[10,11,18,15,12,7,14]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>ap</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    a  ap\n",
       "0  10   1\n",
       "1  11   1\n",
       "2  13   1\n",
       "3  15   1\n",
       "4  12   1\n",
       "5   7   0\n",
       "6  14   0"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dfn=pd.Series(a)\n",
    "dfb=pd.Series(b)\n",
    "df=pd.DataFrame()\n",
    "df['a']=pd.Series(a)\n",
    "df['ap']=pd.Series(ap)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [],
   "source": [
    "bc1=(1+dfn.pct_change(1).fillna(0)).cumprod()\n",
    "bc2=(1+dfb.pct_change(1).fillna(0)).cumprod()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.000000\n",
       "1    0.916667\n",
       "2    1.500000\n",
       "3    1.250000\n",
       "4    1.000000\n",
       "5    0.583333\n",
       "6    1.166667\n",
       "dtype: float64"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bc2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.61"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result01=bc2\n",
    "round(float(max([(result01.iloc[idx] - result01.iloc[idx::].min()) / result01.iloc[idx] for idx in range(len(result01))])), 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    1.1\n",
       "2    1.3\n",
       "3    1.5\n",
       "4    1.2\n",
       "5    0.7\n",
       "6    1.4\n",
       "dtype: float64"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
